// import Vue from "Vue";
// import VueRouter from "vue-router";
// import Home from "../vlopa/HomePage.vue";
// import About from "../vlopa/AboutPage.vue";
// import Login from "../vlopa/LoginPage.vue";
// Vue.use(VueRouter);
// const routes = [
// 	{ path: "/", component: Home },
// 	{ path: "/about", component: About },
// 	{ path: "/login", component: Login },
// ];
// const routers = new VueRouter({
// 	mode: "history",
// 	routes,
// });
// export default routers;

// import Vue from "vue";
// import Router from "vue-router";
// // import Home from './components/Home.vue';
// // import About from './components/About.vue';

// Vue.use(Router);

// const routes = [
// 	{ path: "/", component: Home },
// 	{ path: "/about", component: About },
// ];

// const router = new Router({
// 	mode: "history", // 使用HTML5 History模式，需要后端正确配置支持，否则刷新会404
// 	routes, // (缩写) 相当于 routes: routes
// });

// export default router;

import { createRouter, createWebHistory } from "vue-router";
// import Home from './components/Home.vue';
// import About from './components/About.vue';
import Home from "../vlopa/HomePage.vue";
import About from "../vlopa/AboutPage.vue";
import Login from "../vlopa/LoginPage.vue";
const routes = [
	{ path: "/", component: Home },
	{ path: "/about", component: About },
	{ path: "/login", component: Login },
];

const router = createRouter({
	history: createWebHistory(),
	routes,
});

export default router;
